var getType = function(o){
     return Object.prototype.toString.call(o).slice(8, -1);
};
var helper = {};
helper.page = function(){};
helper.page.prototype = {
	extract: function(data, args){
		if(getType(data)==='String') data = this[data];
		if(!data) return ret;
		args = args || [];
		var ret = {}, l = null, t, hasOwnProperty = Object.prototype.hasOwnProperty;
		for(var i in data){
			if(hasOwnProperty.call(data,i)){
				t = getType(l=data[i]);
				ret[i] = (function(data, i, l, args){
					if(t==='Function') return l.apply(data, args);
					else if(t==='Object') return helper.page.prototype.extract(l, args);
					else return l;
				})(data, i, l, args);
			}
		}
		return ret;
	}
};
var page = new helper.page();
page.test = {
	a:11,
	b:22,
	test:function(){
		return this.c();
	},
	c:function(){
		return this.a + this.b;
	}
};
page.data = {
	a:1,
	b:2,
	cc:{
		c1:40,
		c2:function(){
			return 100;
		},
		c3:function(){
			return this.c2() + this.c1;
		}
	},
	list:function(){
		return this.c();
	},
	c:function(){
		return this.a + this.b;
	}
};
console.log(page.extract(page.data, [page, 1, 2, 3]));
